﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace z.v {
	/// <summary>
	/// Interaction logic for Product.xaml
	/// </summary>
	public partial class Kind : UserControl {
		public Kind() {
			InitializeComponent();
		}
		private void _this_Loaded(object sender, RoutedEventArgs e) {
			if (App.DB == null) return;
			tbl.ItemsSource = App.DB.Kinds.Take(10000);
			tbl.Items.MoveCurrentToLast();
			if (tbl.Items.CurrentItem == null) return;
			tbl.ScrollIntoView(tbl.Items.CurrentItem);
		}
		private void tbl_LostFocus(object sender, RoutedEventArgs e) {
			App.DB.SubmitChanges();
		}
	}
}
